<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<div class="layui-card-body" th:fragment="query">

    <!--每个zmn-form-item一行，每行4列
        支持页面自适应，1280分辨率下不折行
        -->
    <div class="zmn-form-item">
        <div class="item-inline">
            <label class="inline-label">ID/标题：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <!--默认情况下标签box-input-inline占满整个inline-box-cc标签-->
                    <div class="box-input-inline">
                        <input type="text" name="titleOrId" th:value="${vo.titleOrId}" placeholder="请输入ID/名称" autocomplete="off" class="layui-input"
                               maxlength="20"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">类别：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select name="category" id="category" lay-search>
                            <option value="" th:selected="${0 == vo.category}">全部</option>
                            <option th:value="${item.code}"
                                    th:text="${item.name}"
                                    th:selected="${item.code == vo.category}"
                                    th:each="item:${categorys}">类别
                            </option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">状态：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="status" name="status" value="0">
                            <option value="0" th:selected="${0 == vo.status}">-选择-</option>
                            <option value="1" th:selected="${vo.status == 1}">停用</option>
                            <option value="2" th:selected="${vo.status == 2}">启用</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline col1">
            <label class="inline-label">创建时间：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <input type="text" class="layui-input" placeholder="yyyy-MM-dd - yyyy-MM-dd" autocomplete="off"
                               name="startAndEndDate" id="startAndEndDate" th:value="${vo.startAndEndDate}">
                    </div>
                </div>
            </div>
        </div>

    </div>

    <div class="zmn-form-item">

        <div class="item-inline col2">
            <label class="inline-label">发布部门：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline col2">
                        <select lay-filter="deptOneId" id="deptOneId" name="deptOneId" lay-search>
                            <option value=""></option>
                            <option th:each="dept:${oneDepts}" th:value="${dept.deptId}" th:selected="${dept.deptId == vo.deptOneId}" th:text="${dept.deptName}"/>
                        </select>
                    </div>
                    <div class="box-input-inline col2">
                        <select lay-filter="deptTwoId" id="deptTwoId" name="deptTwoId" lay-search>
                            <option value=""></option>
                            <option th:each="dept:${twoDepts}" th:value="${dept.deptId}" th:selected="${dept.deptId == vo.deptTwoId}" th:text="${dept.deptName}"/>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">必须阅读：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="mustRead" name="mustRead" value="0">
                            <option value="0" th:selected="${0 == vo.mustRead}">-选择-</option>
                            <option value="1" th:selected="${vo.mustRead == 1}">否</option>
                            <option value="2" th:selected="${vo.mustRead == 2}">是</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-submit" style="margin: 0px 0 0px 35px;">
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="zmn-form-submit"><i class="layui-icon">&#xe615;</i></button>
            <button class="layui-btn d-button" lay-submit lay-filter="query-export" id="query-export" style="display: none"></button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit="" lay-filter="zmn-form-reset"><i class="layui-icon">&#xe669;</i></button>
        </div>
    </div>
</div>